#ifndef INDEXEDPRIORITYQUEUE_H
# define INDEXEDPRIORITYQUEUE_H

# include <queue>

template <class T>
class IndexedPriorityQueue : public std::priority_queue<T>
{
public:
    T* find(T const & to_find) const
    {
        auto ite = this->c.end();
        for (auto it = this->c.begin(); it != ite; it++)
            if (*it == to_find)
                return const_cast<T*>(&(*it));
        return NULL;
    }

    void display() const
    {
        std::cout << "Node list: " << std::endl;
        auto ite = this->c.end();
        for (auto it = this->c.begin(); it != ite; it++)
            std::cout << *it << std::endl;
    }
};

#endif // INDEXEDPRIORITYQUEUE_H
